package com.itheima.mapper;

import com.itheima.pojo.Emp;
import com.itheima.pojo.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface StudentMapper {



     List<Student> list(String name, Integer educationId, String number, Integer classId);

    @Insert("insert into student( name, number,gender, phone, education_id, class_id,update_time) " +
            " values(#{name},#{number},#{gender},#{phone},#{educationId},#{classId},#{updateTime})")
    void insert(Student student);

    void delete(List<Integer> ids);

    void update(Student student);

    @Update("update student set discipline_count = discipline_count+1,discipline_score=discipline_score+ #{disciplineScore}" +
            "where id = #{id} ")
    void dealDiscipline(Student student);
}
